package c_001;

import static javafx.scene.input.KeyCode.T;

public class T03 {

    private static int count = 10;

    public synchronized static void m(){    //这里等同于synchronized (T03.class)
        count--;
        System.out.println(Thread.currentThread().getName() + " count = " + count);
    }

    public static void n(){
        synchronized (T03.class){
            count--;
            System.out.println(Thread.currentThread().getName() + " count = " + count);
        }
    }
}
